package com.xjm.entity.dto;

import com.xjm.constant.Update;
import jakarta.validation.constraints.*;
import lombok.Data;

@Data
public class MenuDto {
    @NotNull(message = "id不能为空", groups = {Update.class})
    private Integer id;
    @NotBlank(message = "菜单名不能为空")
    @Size(min = 2, max = 10, message = "菜单名长度为2-10位")
    private String name;

    private String path;
    @NotBlank(message = "图标不能为空")
    private String icon;

    @NotNull(message = "排序不能为空")
    @Min(value = 0, message = "排序不能小于0")
    @Max(value = 100, message = "排序不能大于100")
    private Integer sort;

    @NotNull(message = "状态不能为空", groups = {Update.class})
    private Integer status;
    @NotNull(message = "父id不能为空")
    private Integer pid;
}
